package algo3.tp1.tests;

import static org.junit.Assert.assertEquals;
import org.junit.Test;

import algo3.tp1.ejercicios.Ejercicio1;

public class Ejercicio1Tests {
	@Test
	public void testResolver1() {
		Ejercicio1 e = new Ejercicio1();
		
		int[] v1 = {1,1,1,1,1,1,1,1,1};
		int[] v2 = {2,2,2,2,2,2};
	
		assertEquals(9, e.resolver(v1,v2));
	}	
	
	@Test
	public void testResolver2(){
		Ejercicio1 e = new Ejercicio1();
		
		int v1[] = {1,2,3,4,5};
		int v2[] = {2,2,3,4,4};
		
		assertEquals(3, e.resolver(v1,v2));
	}
	
	@Test
	public void testResolver3(){
		Ejercicio1 e = new Ejercicio1();
		
		int v1[] = {1,2,3,4,4};
		int v2[] = {1,2,2,3,4,4};
		
		assertEquals(4, e.resolver(v1,v2));
	}
	
	@Test
	public void testResolver4(){
		Ejercicio1 e = new Ejercicio1();
		
		int v1[] = {1,1,1,1,2,2,2,2};
		int v2[] = {1};
		
		assertEquals(5, e.resolver(v1,v2));
	}
	
	@Test
	public void testResolver5(){
		Ejercicio1 e = new Ejercicio1();
		
		int v1[] = {1};
		int v2[] = {2};
		
		assertEquals(1, e.resolver(v1,v2));
	}
	
	@Test
	public void testResolver6(){
		Ejercicio1 e = new Ejercicio1();
		
		int v1[] = {1};
		int v2[] = {1};
		
		assertEquals(2, e.resolver(v1,v2));
	}
	
	@Test
	public void testResolver7(){
		Ejercicio1 e = new Ejercicio1();
		
		int v1[] = {2,3,4,5,6,7,8,9};
		int v2[] = {1};
		
		assertEquals(1, e.resolver(v1,v2));		
	}
	
	@Test
	public void testResolver8(){
		Ejercicio1 e = new Ejercicio1();
		
		int v1[] = {4,4,4,6,7};
		int v2[] = {2,2,2,2,2,4};
		
		assertEquals(5, e.resolver(v1,v2));
	}
	
	@Test
	public void testResolver9(){
		Ejercicio1 e = new Ejercicio1();
		
		int v1[] = {4,4,4,6,7};
		int v2[] = {2,2,3,4,4,4};
		
		assertEquals(6, e.resolver(v1,v2));
	}

	@Test
	public void testResolver10(){
		Ejercicio1 e = new Ejercicio1();
		
		int v1[] = {1,1,1,1,1,1,1,1};
		int v2[] = {1,1,1,1,1,1,1,1,1};
		
		assertEquals(17, e.resolver(v1,v2));
	}

}